﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using NFine.Code;
using NFine.Domain.Entity.ProductManage;
using NFine.Domain.IRepository.ProductManage;
using NFine.Repository.ProductManage;

namespace NFine.Application.ProductManage
{
  public  class ProductImageApp
  {
      private IProductImageRepository Service = new ProductImageRepository();
        /// <summary>
        /// 根据商品id获取商品图片url集合
        /// </summary>
        /// <param name="productID">商品id</param>
        /// <returns></returns>
        public List<string> GetListByParentId(string productID)
        {
            var expression = ExtLinq.True<ProductImageEntity>();
            expression = t => t.F_ProductId == productID;
            return Service.IQueryable(expression).Select(a => a.F_ImageUrl).ToList();
        }
    }
}
